<template>
  <div class="wrap">
    <!-- <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button> -->
    <el-dialog
      title="展示二維碼"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose"
    >
      <span>
        <img src="../../assets/rqcode.jpg" alt="" />
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>

    <el-container>
      <el-header>关于融惠通</el-header>
      <el-container>
        <el-aside width="80px">
          <div class="left">
            <span>申請</span>
            <span @click="tolist">列表</span>
            <span>xxx</span>
          </div>
        </el-aside>
        <el-main>
          <div class="about">
            <span>二维码</span>
            <span>
              <button @click="dialogVisible = true">查看</button>
            </span>
            <span><button>下载</button></span>
          </div>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script>
export default {
  data() {
    return {
        qrcodeSrc: '',
        dialogVisible: false
    };
  },
  created(){
      let xxId = localStorage.getItem('xxid')
      this.$api.lookrqcode({
          id: xxId
        }).then(value =>{
          this.qrcodeSrc = value.data
          // console.log(this.src)
        })
  },
 methods:{
    tolist() {
      this.$router.push({ path: 'list', query: { id: '0' } });
    },
    handleClose(done) {

        // this.$confirm('确认关闭？')
        //   .then(_ => {
        //     done();
        //   })
        //   .catch(_ => {})
      }
 }
  }


</script>
<style lang="scss">
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
  line-height: 31vh;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}

body > .el-container {
  margin-bottom: 80px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
.about {
  display: flex;
  justify-content: space-between;
  padding: 20px 50px;
  font-size: 30px;
  button {
    width: 200px;
    height: 50px;
    border-radius: 10px;
    background-color: rgb(107, 80, 105);
    color: #fff;
    font-size: 30px;
  }
}
.left span {
  height: 80%;
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
}
</style>

